 @extends('admin/layout')

@section('content')

<div class="content-wrapper" style="min-height: 923px;">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                用户管理
                <small>管理员详情</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 主页</a></li>
                <li><a href="#">用户管理</a></li>
                <li class="active">管理员列表</li>
                <li class="active">管理员详情</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="box">
                        <div class="box-header">
                            <h3 class="box-title">管理员详情</h3>
                        </div><!-- /.box-header -->
                        <div class="box-body">
                            
                            <div class="row">
                            <div class="col-sm-12">
                            <table id="example1" class="table table-bordered table-striped dataTable" role="grid" aria-describedby="example1_info">
                                <thead>
                                <tbody>
                                <tr role="row" class="odd" >
                                <th class="sorting_asc" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 90px;" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">ID</th>
                                <td>{{ $data -> id }}</td>
								
                                </tr>
                                <tr role="row" class="odd" >
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 90px;" aria-label="Browser: activate to sort column ascending">邮箱</th>
                                <td> {{ $data -> email }} </td>
                                </tr>

								<tr role="row" class="odd" >
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 90px;" aria-label="Platform(s): activate to sort column ascending">状态</th>
                                <td>
								@if($data -> status == 1)
									启用
								@else
									禁用
								@endif
                                </td>
                                </tr>
                                <tr role="row" class="odd" >
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 90px;" aria-label="Engine version: activate to sort column ascending">注册时间</th>
                                <td>{{ date('Y-m-d' ,$data -> regtime) }}</td>
                                </tr>
                                <tr role="row" class="odd" >
                                <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 90px;" aria-label="CSS grade: activate to sort column ascending">头像</th>
                                <td>
                                	<img src="{{ url('/uploads/portrait')}}/{{ $data -> pic }}" height="100px">
                                </td>
                                </tr>

								

								</tbody>
                            </table>
                            </div>
                            </div>
                            <div class="row">
                            	
                            </div>
                        </div><!-- /.box-body -->
                    </div><!-- /.box -->
                </div><!-- /.col -->
            </div><!-- /.row -->
        </section><!-- /.content -->
    </div>

    <!-- <script type="text/javascript">

    window.onload = function()
    {
        $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            }
        });

        //修改鼠标形状
        $('.mouse').css('cursor', 'pointer');
        $('.status').css('cursor', 'pointer');

        //单击更改用户状态
        $('.status').on('click', function()
        {
            //获取id
            var id = $(this).parent().parent().find('#ids').html();
            //获取对象
            var obj = $(this);
            $.ajax({
                type:'POST',
                url:"{{ url('admin/user/status') }}",
                data:{id:id},
                success:function(data)
                {
                    if(data == 2)
                    {
                        alert('修改失败');
                    }else if(data == 0)
                    {
                        obj.html('禁用');
                    }else if(data == 1)
                    {
                        obj.html('启用');
                    }
                },
                error:function()
                {
                    alert('异常');
                }
            });

        });
    }

    </script> -->

@endsection